/*
Author: Drew Risinger, Chris Cochoff, Jordan Walsh, Cameron Holloway
Course: COMP 220, Computer Programming II
Date: February 24, 2014
Description: This is the header file for the Player class.
This class controls user action, displays hands, indicates if the player
has busted, and keeps track of the player's name.
*/
#include "Card.h"
#include "Deck.h"
#include <string>
#include <vector>
using namespace std;

enum PlayerType{Human,Dealer};

class Player {
public: 
	Player(string,PlayerType);
	void chooseHumanAction(Deck&); //includes cout/cin interaction
	void chooseComputerAction(Deck&);
	void drawCard(Deck&);
	int handValue(void); //displays numerical value of hand
	string getName(void);
	bool isBusted(void){if(handValue()>21) return true; return false;} //inline bust check
	void clearHand(void);
	void displayDealerHand(void); //public so that it can be called from the game class
								  //displays top card dealt to the dealer
private:
	vector<Card> hand; //each player's hand is a vector of cards
	//actions
	void displayHand(void); //displays value and suit
	void hit(Deck&);
	void stand(void);

	//private variables
	bool isStanding; //indicates if player is standing
	string name;
	PlayerType humanType;
};
